Use an image menu item here (popup_targets_received): Call
authorAnders Carlsson <andersca@gnu.org>
Tue, 23 Oct 2001 22:43:01 +0000 (22:43 +0000)
committerAnders Carlsson <andersca@src.gnome.org>
Tue, 23 Oct 2001 22:43:01 +0000 (22:43 +0000)
2001-10-24  Anders Carlsson  <andersca@gnu.org>

* gtk/gtkentry.c: (append_action_signal): Use an image menu item here
(popup_targets_received): Call append_action_signal with stock items

* gtk/gtklabel.c: (append_action_signal): Use an image menu item here
(gtk_label_do_popup): Call append_action_signal with stock items

* gtk/gtktextview.c: (append_action_signal): Use an image menu item here
(popup_targets_received): Call append_action_signal with stock items

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkentry.c
gtk/gtklabel.c
gtk/gtktextview.c

index a7710e4b373a37fe5a52de9ed55ccc27f9a8ea99..b6cd8b6d27ca622a1fb8dc7eacdbc59998c39a63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-10-24  Anders Carlsson  <andersca@gnu.org>
+
+       * gtk/gtkentry.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+       
+       * gtk/gtklabel.c: (append_action_signal): Use an image menu item here
+       (gtk_label_do_popup): Call append_action_signal with stock items
+       
+       * gtk/gtktextview.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): queue a resize here; will
index a7710e4b373a37fe5a52de9ed55ccc27f9a8ea99..b6cd8b6d27ca622a1fb8dc7eacdbc59998c39a63 100644 (file)
@@ -1,3 +1,14 @@
+2001-10-24  Anders Carlsson  <andersca@gnu.org>
+
+       * gtk/gtkentry.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+       
+       * gtk/gtklabel.c: (append_action_signal): Use an image menu item here
+       (gtk_label_do_popup): Call append_action_signal with stock items
+       
+       * gtk/gtktextview.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): queue a resize here; will
index a7710e4b373a37fe5a52de9ed55ccc27f9a8ea99..b6cd8b6d27ca622a1fb8dc7eacdbc59998c39a63 100644 (file)
@@ -1,3 +1,14 @@
+2001-10-24  Anders Carlsson  <andersca@gnu.org>
+
+       * gtk/gtkentry.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+       
+       * gtk/gtklabel.c: (append_action_signal): Use an image menu item here
+       (gtk_label_do_popup): Call append_action_signal with stock items
+       
+       * gtk/gtktextview.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): queue a resize here; will
index a7710e4b373a37fe5a52de9ed55ccc27f9a8ea99..b6cd8b6d27ca622a1fb8dc7eacdbc59998c39a63 100644 (file)
@@ -1,3 +1,14 @@
+2001-10-24  Anders Carlsson  <andersca@gnu.org>
+
+       * gtk/gtkentry.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+       
+       * gtk/gtklabel.c: (append_action_signal): Use an image menu item here
+       (gtk_label_do_popup): Call append_action_signal with stock items
+       
+       * gtk/gtktextview.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): queue a resize here; will
index a7710e4b373a37fe5a52de9ed55ccc27f9a8ea99..b6cd8b6d27ca622a1fb8dc7eacdbc59998c39a63 100644 (file)
@@ -1,3 +1,14 @@
+2001-10-24  Anders Carlsson  <andersca@gnu.org>
+
+       * gtk/gtkentry.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+       
+       * gtk/gtklabel.c: (append_action_signal): Use an image menu item here
+       (gtk_label_do_popup): Call append_action_signal with stock items
+       
+       * gtk/gtktextview.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): queue a resize here; will
index a7710e4b373a37fe5a52de9ed55ccc27f9a8ea99..b6cd8b6d27ca622a1fb8dc7eacdbc59998c39a63 100644 (file)
@@ -1,3 +1,14 @@
+2001-10-24  Anders Carlsson  <andersca@gnu.org>
+
+       * gtk/gtkentry.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+       
+       * gtk/gtklabel.c: (append_action_signal): Use an image menu item here
+       (gtk_label_do_popup): Call append_action_signal with stock items
+       
+       * gtk/gtktextview.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): queue a resize here; will
index a7710e4b373a37fe5a52de9ed55ccc27f9a8ea99..b6cd8b6d27ca622a1fb8dc7eacdbc59998c39a63 100644 (file)
@@ -1,3 +1,14 @@
+2001-10-24  Anders Carlsson  <andersca@gnu.org>
+
+       * gtk/gtkentry.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+       
+       * gtk/gtklabel.c: (append_action_signal): Use an image menu item here
+       (gtk_label_do_popup): Call append_action_signal with stock items
+       
+       * gtk/gtktextview.c: (append_action_signal): Use an image menu item here
+       (popup_targets_received): Call append_action_signal with stock items
+
 2001-10-23  Havoc Pennington  <hp@redhat.com>
 
        * gtk/gtktextview.c (changed_handler): queue a resize here; will
index d12ccf4afda93133227b98e68d2080db6f677516..d2426f08e1f834617db4e5e9a63d4b39db9039ee 100644 (file)
@@ -34,6 +34,7 @@
 #include "gtkclipboard.h"
 #include "gtkdnd.h"
 #include "gtkentry.h"
+#include "gtkimagemenuitem.h"
 #include "gtkimmulticontext.h"
 #include "gtkintl.h"
 #include "gtkmain.h"
@@ -42,6 +43,7 @@
 #include "gtkseparatormenuitem.h"
 #include "gtkselection.h"
 #include "gtksettings.h"
+#include "gtkstock.h"
 #include "gtksignal.h"
 #include "gtkwindow.h"
 
@@ -3701,11 +3703,11 @@ gtk_entry_mnemonic_activate (GtkWidget *widget,
 static void
 append_action_signal (GtkEntry     *entry,
                      GtkWidget    *menu,
-                     const gchar  *label,
+                     const gchar  *stock_id,
                      const gchar  *signal,
                       gboolean      sensitive)
 {
-  GtkWidget *menuitem = gtk_menu_item_new_with_label (label);
+  GtkWidget *menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
 
   gtk_object_set_data (GTK_OBJECT (menuitem), "gtk-signal", (char *)signal);
   gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
@@ -3781,11 +3783,11 @@ popup_targets_received (GtkClipboard     *clipboard,
                                 GTK_WIDGET (entry),
                                 popup_menu_detach);
       
-      append_action_signal (entry, entry->popup_menu, _("Cut"), "cut_clipboard",
+      append_action_signal (entry, entry->popup_menu, GTK_STOCK_CUT, "cut_clipboard",
                            entry->editable && entry->current_pos != entry->selection_bound);
-      append_action_signal (entry, entry->popup_menu, _("Copy"), "copy_clipboard",
+      append_action_signal (entry, entry->popup_menu, GTK_STOCK_COPY, "copy_clipboard",
                            entry->current_pos != entry->selection_bound);
-      append_action_signal (entry, entry->popup_menu, _("Paste"), "paste_clipboard",
+      append_action_signal (entry, entry->popup_menu, GTK_STOCK_PASTE, "paste_clipboard",
                            entry->editable && clipboard_contains_text);
       
       menuitem = gtk_menu_item_new_with_label (_("Select All"));
index b682a8a95484eaea1d04e1bfb30825e678036c47..a76f88da98f04a15db5bee507d25701d41d7c94a 100644 (file)
 #include "gtkclipboard.h"
 #include "gdk/gdki18n.h"
 #include <pango/pango.h>
+#include "gtkimagemenuitem.h"
 #include "gtkintl.h"
 #include "gtkseparatormenuitem.h"
 #include "gtkmenuitem.h"
 #include "gtknotebook.h"
+#include "gtkstock.h"
 #include "gtkbindings.h"
 
 struct _GtkLabelSelectionInfo
@@ -3087,11 +3089,11 @@ activate_cb (GtkWidget *menuitem,
 static void
 append_action_signal (GtkLabel     *label,
                      GtkWidget    *menu,
-                     const gchar  *label_text,
+                     const gchar  *stock_id,
                      const gchar  *signal,
                       gboolean      sensitive)
 {
-  GtkWidget *menuitem = gtk_menu_item_new_with_label (label_text);
+  GtkWidget *menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
 
   gtk_object_set_data (GTK_OBJECT (menuitem), "gtk-signal", (char *)signal);
   gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
@@ -3168,11 +3170,11 @@ gtk_label_do_popup (GtkLabel       *label,
     label->select_info->selection_anchor != label->select_info->selection_end;
 
 
-  append_action_signal (label, label->select_info->popup_menu, _("Cut"), "cut_clipboard",
+  append_action_signal (label, label->select_info->popup_menu, GTK_STOCK_CUT, "cut_clipboard",
                         FALSE);
-  append_action_signal (label, label->select_info->popup_menu, _("Copy"), "copy_clipboard",
+  append_action_signal (label, label->select_info->popup_menu, GTK_STOCK_COPY, "copy_clipboard",
                         have_selection);
-  append_action_signal (label, label->select_info->popup_menu, _("Paste"), "paste_clipboard",
+  append_action_signal (label, label->select_info->popup_menu, GTK_STOCK_PASTE, "paste_clipboard",
                         FALSE);
   
   menuitem = gtk_menu_item_new_with_label (_("Select All"));
index 6cbe53c5c8fdff0424ac3cd86fdcc0ce60aa6908..2e33971f48cc1f34f42bf9900e0a8321a72fd2f6 100644 (file)
@@ -29,6 +29,7 @@
 #define GTK_TEXT_USE_INTERNAL_UNSUPPORTED_API
 #include "gtkbindings.h"
 #include "gtkdnd.h"
+#include "gtkimagemenuitem.h"
 #include "gtkintl.h"
 #include "gtkmain.h"
 #include "gtkmenu.h"
@@ -36,6 +37,7 @@
 #include "gtkseparatormenuitem.h"
 #include "gtksettings.h"
 #include "gtksignal.h"
+#include "gtkstock.h"
 #include "gtktextdisplay.h"
 #include "gtktextview.h"
 #include "gtkimmulticontext.h"
@@ -5354,11 +5356,11 @@ activate_cb (GtkWidget   *menuitem,
 static void
 append_action_signal (GtkTextView  *text_view,
                      GtkWidget    *menu,
-                     const gchar  *label,
+                     const gchar  *stock_id,
                      const gchar  *signal,
                       gboolean      sensitive)
 {
-  GtkWidget *menuitem = gtk_menu_item_new_with_label (label);
+  GtkWidget *menuitem = gtk_image_menu_item_new_from_stock (stock_id, NULL);
 
   g_object_set_data (G_OBJECT (menuitem), "gtk-signal", (char *)signal);
   gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
@@ -5485,11 +5487,11 @@ popup_targets_received (GtkClipboard     *clipboard,
       
       can_insert = gtk_text_iter_can_insert (&iter, text_view->editable);
       
-      append_action_signal (text_view, text_view->popup_menu, _("Cut"), "cut_clipboard",
+      append_action_signal (text_view, text_view->popup_menu, GTK_STOCK_CUT, "cut_clipboard",
                            have_selection);
-      append_action_signal (text_view, text_view->popup_menu, _("Copy"), "copy_clipboard",
+      append_action_signal (text_view, text_view->popup_menu, GTK_STOCK_COPY, "copy_clipboard",
                            have_selection);
-      append_action_signal (text_view, text_view->popup_menu, _("Paste"), "paste_clipboard",
+      append_action_signal (text_view, text_view->popup_menu, GTK_STOCK_PASTE, "paste_clipboard",
                            can_insert && clipboard_contains_text);
       
       menuitem = gtk_separator_menu_item_new ();